Emotion Detection from EEG Signals Using Machine Deep Learning Models

Detecting emotions is a growing field aiming to comprehend and interpret human emotions from various data sources, including text, voice, and physiological signals. Electroencephalogram (EEG) is a unique and promising approach among these sources. EEG is a non-invasive monitoring technique that records the brain’s electrical activity through electrodes placed on the scalp’s surface. It is used in clinical and research contexts to explore how the human brain responds to emotions and cognitive stimuli. Recently, its use has gained interest in real-time emotion detection, offering a direct approach independent of facial expressions or voice. This is particularly useful in resource-limited scenarios, such as brain–computer interfaces supporting mental health. The objective of this work is to evaluate the classification of emotions (positive, negative, and neutral) in EEG signals using machine learning and deep learning, focusing on Graph Convolutional Neural Networks (GCNN), based on the analysis of critical attributes of the EEG signal (Differential Entropy (DE), Power Spectral Density (PSD), Differential Asymmetry (DASM), Rational Asymmetry (RASM), Asymmetry (ASM), Differential Causality (DCAU)). The electroencephalography dataset used in the research was the public SEED dataset (SJTU Emotion EEG Dataset), obtained through auditory and visual stimuli in segments from Chinese emotional movies. The experiment employed to evaluate the model results was “subject-dependent”. In this method, the Deep Neural Network (DNN) achieved an accuracy of 86.08%, surpassing SVM, albeit with significant processing time due to the optimization characteristics inherent to the algorithm. The GCNN algorithm achieved an average accuracy of 89.97% in the subject-dependent experiment. This work contributes to emotion detection in EEG, emphasizing the effectiveness of different models and underscoring the importance of selecting appropriate features and the ethical use of these technologies in practical applications. The GCNN emerges as the most promising methodology for future research.


Introduction
Human emotion detection and recognition are crucial in advancing human interactions and technological systems.In recent years, the application of signal processing techniques, machine learning, and artificial intelligence has shown promise in analyzing electroencephalography (EEG) signals for emotion classification [1].EEG is an electrophysiological recording of brain activity that provides information about an individual's emotional states, offering a window into understanding the neural responses underlying different emotional stimuli [2].
Emotion recognition focuses on various modalities, such as audiovisual expressions, body language, and physiological signals.Compared to other modalities, physiological signals, such as electroencephalography (EEG), electrocardiography (ECG), and electromyography (EMG), have the advantage of being difficult to hide or disguise.In recent years, due to the rapid development of non-invasive, easy-to-use, and more affordable EEG recording devices compared to other acquisition techniques, such as Magnetic Resonance Imaging (MRI) and Magnetoencephalography (MEG), EEG-based emotion recognition has received increasing research attention [3] and applications (Zhong, Wang, and Miao) [4].While EEG has limited spatial resolution and requires many electrodes placed in various locations on the head, it provides adequate time resolution, allowing researchers to study phase changes in response to emotional stimuli.Additionally, EEG is non-invasive, fast, and inexpensive, making it a more common method for studying the brain's responses to emotional stimuli [5].
Various efforts have been made to explore the use of machine learning models, such as Logistic Regression (LR), k-nearest Neighbors (KNN), Support Vector Machines (SVM), Deep Neural Networks (DNN), and Dynamic Graph Convolutional Neural Networks (DGCNN), in analyzing emotions in EEG signals; however, many challenges persist [6,7].The overlap of brain activation patterns between different emotions, inter-individual variability, and inherent noise in EEG signals are just a few examples of the obstacles that must be overcome to achieve accurate and robust classification [8].
The theoretical background of this research is based on the application of machine learning and deep learning techniques, which have emerged as a promising approach for advancing emotion recognition from EEG signals [9].LR models the probability of an emotional state as a function of the EEG features, while KNN classifies emotions based on the similarity of EEG patterns to those of labeled examples.SVM, on the other hand, can capture nonlinear relationships between EEG features and emotional states by using kernel functions to map the data into a higher-dimensional space.To address these limitations, deep learning approaches have gained significant attention in the field of EEG-based emotion recognition [10].Deep Neural Networks (DNNs) are a class of deep learning models that can automatically learn hierarchical representations from raw EEG signals, enabling the capture of complex nonlinear patterns associated with emotional processing in the brain.By stacking multiple layers of artificial neurons, DNNs can extract increasingly abstract and meaningful features from the EEG data, leading to superior performance in emotion classification tasks compared to traditional machine learning models [11].
Furthermore, the incorporation of graph-based deep learning techniques, such as Graph Convolutional Neural Networks (GCNNs), has demonstrated the ability to model the spatial relationships between EEG electrodes.EEG signals can be represented as a graph, where the electrodes are the nodes and the connections between them reflect the spatial dependencies in the brain [4].GCNNs leverage this graph structure to learn features that capture the complex spatial and temporal dynamics of EEG signals, providing a more comprehensive understanding of the neural correlates of emotions.
Emotion classification in EEG signals represents a multidisciplinary challenge that involves the intersection of digital signal processing, machine learning, and neuroscience.The importance of emotion classification using EEG signals is significant for multiple applications.However, there is a lack of scientific publications comprehensively testing and comparing various models to solve this problem.To address this gap, the main objective of this research is to evaluate the effectiveness of different machine learning models, ranging from more conventional techniques like Logistic Regression, K-Nearest Neighbors, and Support Vector Machines to advanced deep learning approaches such as Deep Neural Networks and Graph Convolutional Neural Networks (GCNNs).By applying these diverse models to analyze the key EEG signal attributes, the study aims to deepen the understanding of the complex relationships between brain activity patterns and emotional representation of temporal and spatial patterns in EEG signals while reducing computational complexity.
Jeong, Kim, and Kim (2023) [16] proposed a hierarchical neural network with selfattention, extracting local and global features for EEG-based emotion recognition using a Hierarchical Space-temporal Context Feature Learning Model (HSCFLM).They evaluated the DEAP, MAHNOB-HCI, and SEED datasets.Pre-processing involved band-pass filtering, resolution reduction, blink artifact removal, segmentation, and spectral analysis for each frontal, temporal, central, parietal, and occipital region.Methods such as CNN, LSTM, BGRU, CRNN, and HA-BGRU were compared, where multichannel EEG signals were applied to each neural network without dividing the brain into regions.Proposed methods like R2G HA-BGRU, R2GTF, R2G HAS-BGRU, and HSCFLM divided the brain into nine defined regions, grouping corresponding electrodes by region.The best results were obtained with the MAHNOB-HCI dataset, achieving two-level classification with an accuracy for valence, arousal, and dominance of 93.3%, 91.6%, and 92.8%, respectively.The three-level classification with the same dataset reached 88.9%, 89.1%, and 89.4%.
Zhang, X., et al. ( 2023) [17] developed a novel self-training maximum classifier discrepancy (SMCD) method for EEG signal emotion recognition.The proposed approach leverages a feature generator and two classifiers to detect the decision boundary of a particular task, thereby maximizing the discrepancies between the two classifiers' outputs.This method effectively deals with domain transfer problems by using unlabeled test data to fully utilize knowledge from the new subject and reduce the domain gap.Additionally, a 3D Cube is constructed to incorporate the spatial and frequency information of the EEG data, creating input features for a Convolutional Neural Network (CNN).Extensive experiments on the SEED and SEED-IV datasets demonstrate the superior performance of the proposed method over state-of-the-art methods.
The authors Dwivedi, Verma, and Taran (2024) [18] transformed EEG signals from the GAMEEMO dataset into images using time-frequency representation techniques, achieving the best results with Smoothed Pseudo Wigner-Ville Distribution (SPWVD).Subsequently, they applied the GoogleNet network to extract features and optimized its parameters.Moreover, they employed Bayesian optimization (BO) to automate the selection of CNN hyperparameters to predict four emotional states.The method achieved an accuracy of 84.2%, and the AUC for the boring, horror, calm, and funny classes were 0.9712, 0.9596, 0.9597, and 0.9625, respectively.
Fan et al. (2024) [19] proposed a dual-module approach using an enhanced capsule network and long short-term residual memory (ICaps-ResLSTM).This approach consists of ICapsNet to capture spatial information from EEG signals and ResLSTM to extract highlevel temporal information, obtaining high-resolution spatiotemporal features.The average accuracy of 10-fold for arousal, valence, and dominance in the DREAMER dataset reached 94.97%, 94.71%, and 94.96%, respectively.
Roshdy et al. (2024) [20] evaluated the combination of facial expression analysis from DeepFace with CNN based on EEG signals.In this approach, raw EEG data undergo processing to generate a heat map of brain activity.The results for happy and sad emotions achieved an efficiency of 91.21% when integrating CNN with DeepFace CNN.
These approaches can potentially deepen our understanding of the complex interactions between EEG channels and provide significant gains in emotion classification accuracy Rajwal and Aggarwal (2023) [21].The convergence of various studies emphasizes the importance of exploring graph neural network architecture to enhance EEG signal analysis, offering an exciting perspective for future advances at the interface of neuroscience, signal processing, and machine learning.
In an increasingly user-centric context, interpreting and reacting to human emotions becomes crucial for developing more effective interfaces and interactions.Understanding emotional responses allows the creation of more empathetic technologies which are capable of dynamically adapting to users' needs and emotional states.Therefore, this work evaluates the main attributes of the EEG signal and analyzes the classification of emotions using machine learning and deep learning.Table 1 compiles and presents the results of each of the referenced studies.

EEG Datasets
The choice of EEG dataset plays a crucial role in conducting research and studies related to emotion recognition.However, obtaining suitable EEG datasets can be challenging due to several inherent difficulties.
Firstly, the availability of emotion-specific EEG datasets is relatively limited compared to other research areas [2].This is due to EEG data's sensitive and restricted nature, which are collected directly from individuals' brains.As a result, researchers may face difficulties finding appropriate datasets that align with their specific research objectives.
Furthermore, these datasets often have size, security, and cost limitations.EEG data are voluminous regarding the number of samples and dimensions, which can restrict access to larger datasets [22].Additionally, the security and privacy of participants involved in EEG data collection are paramount concerns, often requiring stringent protocols for data acquisition, storage, and sharing [1].This can further complicate the accessibility of publicly available EEG datasets.Moreover, preparing and curating EEG data can be costly in terms of human and financial resources, as EEG data collection, processing, and labeling require technical expertise and specialized equipment.
The choice of an EEG dataset is crucial for the success of emotion recognition research.Despite the abovementioned challenges in obtaining such data, several public and private datasets have been instrumental in advancing the field [23].These datasets provide researchers with a rich source of brain signals recorded during different types of emotional stimuli and activities, enabling the analysis and development of robust and effective emotion recognition algorithms.
Among the notable EEG datasets, it is possible to highlight the following: These datasets vary in size, format, quality, and purpose, but they all provide valuable information for analyzing EEG patterns associated with different emotions.
For example, the SEED (SJTU Emotion EEG Dataset) contains EEG data from multiple subjects experiencing different emotional stimuli, making it a valuable resource for training and testing emotion recognition algorithms [12].The DEAP and the DREAMER, on the other hand, present multimodal physiological signals, including EEG, collected during the presentation of audiovisual stimuli designed to evoke different emotions [24,25].The TUH EEG Dataset and the MPI LEMON Dataset provide clinical EEG data collected from patients in hospital settings, enabling the exploration of emotions in medical contexts [26].The MAHNOB HCI Dataset was designed to capture a wide range of human emotions, collecting data from subjects exposed to varied emotional stimuli such as images, videos, and music.It contains detailed records of EEG signals from each subject, enabling the analysis of variations in brain patterns during different emotional states [28].
Among the various datasets available for research in emotion recognition, the SEED (SJTU Emotion EEG Dataset) stands out as a notable option due to its distinct characteristics and peculiar advantages.SEED provides a controlled environment for acquiring EEG data related to emotions, encompassing a diverse and well-defined range of emotional stimuli, resulting in a comprehensive spectrum of captured emotional responses.This, in turn, enriches the intrinsic variety and representativeness of the dataset.Additionally, the dataset features high-quality EEG signals, with rigorous control over interference and noise, ensuring the results' reliability.The precise spatial resolution of the electrodes used in SEED is worth noting, enabling the accurate identification of brain activities in specific regions.This feature is crucial in understanding the correlations between brain patterns and emotional states, fostering more thorough analyses and deeper correlations.Therefore, the selection of SEED as the basis for this dissertation is grounded in these advantages, which allow for the in-depth exploration of the complex interactions between the brain and emotions through machine learning techniques.

SEED
The SJTU Emotion EEG Dataset (SEED) is a dataset that captures brain responses associated with different emotional states.EEG data were collected from fifteen subjects (seven males and eight females, mean age = 23.27).These EEG data were obtained through auditory and visual stimuli in the form of excerpts from Chinese emotional movies.While participants watched 15 four-minute movie excerpts with three types of emotion (positive, negative, and neutral), their EEG data were recorded by an ESI NeuroScan system with 62 channels at a sampling rate of 1000 Hz.The EEG data were downsampled to 200 Hz and manually checked to remove EOG and EMG artifacts [29].EEG recordings were captured for each subject over three chronologically disconnected sessions, and each session repeated the same experiment.Additionally, SEED does not contain arousal information; therefore, it only recognized positive, neutral, and negative emotions in SEED.After preprocessing with a band-pass filter (between 0.3 and 50 Hz), five features (DE, PSD, DASM, RASM, and DCAU) were extracted with a 1-second window in five bands: delta (0.5-4 Hz), theta (4-7 Hz), alpha (8-13 Hz), beta (14-30 Hz), and gamma (>30 Hz) bands.

EEG Pre-Processing
It is imperative to understand the intricate feature extraction process in order to understand the complexities of analyzing EEG signals in emotion recognition.This process is pivotal in unraveling significant insights embedded within EEG data, facilitating subsequent classification and recognition tasks.The multifaceted nature of EEG signals necessitates a meticulous approach across various domains, including time and frequency, each offering unique advantages and challenges.In the following discussion, the fundamental principles and methodologies in extracting features from EEG signals are explored, shedding light on the diverse strategies employed to decipher the intricate interplay between brain dynamics and emotional states.

Feature Extraction
The analysis of EEG signals is a complex task due to the multidimensional and dynamic nature of these signals [30].Therefore, proper feature extraction is crucial to highlight important information that can be used in subsequent processes of classification and emotion recognition [31].
Feature extraction is conducted in three main dimensions: the time domain, the frequency domain, and the combination of both domains.In the time domain, various statistical attributes are directly extracted from EEG signals.Among these attributes, the mean, standard deviation, kurtosis, and skewness stand out, providing information about central tendency, dispersion, and signal shape [32].Additionally, temporal features such as zero-crossing rate and signal energy are also used to understand aspects of temporal variation.
In the frequency domain, techniques such as the Fourier Transform are applied to map EEG signals from the time domain to the frequency domain.This allows the analysis of spectral components present in the signals, revealing patterns of activity in different frequency bands [22].Spectral features such as power spectral density (PSD) and the ratio between frequency bands are extracted to capture the distribution of energy across the frequency spectrum [7].
Combining features extracted from both the time and frequency domains provides a comprehensive representation of EEG signals, allowing for the identification of discriminative patterns related to emotions [14].This feature extraction step is crucial for feeding the classification algorithms employed, enabling the development of robust emotional recognition models from EEG signals.
In the time domain, advantages include directly representing EEG signals in their raw form, allowing for the direct visualization of temporal variations [32].Features such as peak amplitudes and durations can be observed, preserving important information about temporal dynamics.However, there are disadvantages, such as susceptibility to noise, as EEG signals can be affected by various types of interference.Additionally, analyzing complex patterns in temporal signals can be challenging, significantly when multiple brain activities are overlapping [5].
In the frequency domain, the main advantage is spectral characterization, which enables the identification of activity patterns in different frequency bands such as delta, theta, alpha, beta, and gamma, providing information about specific brain activities [30].The detection of spectral components such as frequency peaks is also possible.However, there is a disadvantage associated with the loss of temporal information, as the Fourier transformation does not preserve the temporal sequence of events.Additionally, the overlap of different brain activities in the same frequency band can make it difficult to distinguish between these activities [32].
The time-frequency domain combines the advantages of the previous domains, allowing for the visualization of how spectral features evolve [7].It is suitable for detecting rapid changes in spectral features, such as transient frequency peaks, indicating dynamic changes in the signal.However, it presents limitations, such as limited resolution due to the Heisenberg uncertainty principle, which imposes a trade-off between temporal and frequency resolution.Additionally, transforming the signal into the time-frequency domain requires higher computational complexity [30].
In summary, the choice of EEG analysis domain depends on the objectives and context of the analysis.The time domain is suitable for studying rapid and complex events, and the frequency domain is useful for characterizing different brain activities.In contrast, the timefrequency domain combines the former's advantages but requires the consideration of resolution and computational complexity [8].
The SJTU Emotion EEG Dataset (SEED) provides some intrinsic characteristics of electroencephalography (EEG) signals that can be explored as measurement variables for the analysis of relevant patterns in identifying participants' emotions.These characteristics include the following: The rationale for including these specific EEG features is that the dataset already includes them, but also because each measurement variable has a unique characteristic related to the EEG signal.The power spectral density (PSD) describes power distribution across different frequency bands of the EEG signal, providing valuable insights into brain activity in different emotional states.The differential entropy (DE) captures the complexity of the EEG signal, serving as a measure of uncertainty associated with different data samples, which is crucial for emotion analysis.
SEED also provides features that reveal information about asymmetry between brain hemispheres.The differential asymmetry (DASM) technique provides a measure of the difference in electrical activities between the left and right hemispheres, while rational asymmetry (RASM) and asymmetry (ASM) measure imbalances in brain activities between specific pairs of electrodes.These features are of great importance as many studies have linked hemispheric asymmetries to different emotional states [13,33,34].
Additionally, the SEED dataset includes differential causality (DCAU), which explores the causal relationships between different brain regions.This feature provides insights into how different brain areas interact and influence each other, which is crucial for understanding the neural basis of emotions.Understanding the fundamental characteristics of electroencephalogram (EEG) signals, particularly their frequency and amplitude, is crucial for accurate emotion analysis as these signals reflect brain activity and exhibit variations linked to different mental states.The traditional frequency bands-delta (0.5-4 Hz), theta (4-8 Hz), alpha (8-13 Hz), beta (13-30 Hz), and gamma (30-100 Hz)-each correspond to specific neural functions, with delta associated with deep sleep, alpha with a relaxed state, beta with active mental engagement, and gamma with heightened cognitive processing.Amplitude, which indicates the intensity of neural activity, varies with mental states; for example, higher alpha amplitudes occur during relaxation, while beta amplitudes increase during intense cognitive tasks.The interplay between frequency and amplitude provides insights into distinct emotional and cognitive states, enabling effective emotion classification based on EEG signals.Understanding these characteristics allows the identification of patterns within the different frequency bands, thereby enhancing emotion detection capabilities through EEG analysis.

Feature Smoothing
Utilizing the method of feature smoothing through linear dynamical systems (LDS) offers a promising approach for processing electroencephalography (EEG) signals.One of the main advantages of this approach is the ability to reduce noise in EEG signals, resulting in smoother and more representative features.This is crucial as EEG signals often suffer from various types of interferences, such as muscle and electrical artifacts, which can compromise the accuracy of analyses [32].In the case of SEED, the authors employed the LDS method to filter out components not associated with emotional states (noise and artifacts) and consider emotional states' temporal dynamics.By smoothing features, LDS can contribute to removing these interferences, thus improving the quality of extracted information and, consequently, the accuracy of emotional analyses [5].
Furthermore, using LDS in feature smoothing allows for incorporating information from previous states, creating a more coherent temporal relationship between data.This is particularly relevant in EEG as brain activity is inherently time-dependent.Through a sequential approach, LDS considers the temporal evolution of features, providing a more dynamic representation of EEG signals and thus preserving relevant temporal information for emotion analysis [35].
However, it is essential to note that the use of LDS for feature smoothing also faces challenges.One of the main challenges is the trade-off between smoothing and preserving important information.In some cases, excessive smoothing can lead to the loss of relevant details, affecting the precision of analyses.Additionally, applying LDS requires a good understanding of the properties of the underlying dynamical system in EEG data, which can be a complex task and may require proper adjustments [36].
In summary, feature smoothing through LDS presents significant advantages for processing EEG signals, reducing noise, improving information quality, and preserving temporal information.However, it is essential to consider the challenges associated with the excessive smoothing and modelling of dynamical systems, aiming for a balance that results in more reliable and accurate emotional analyses.

Experimental Design
Logistic Regression (LR) and K-Nearest Neighbors (KNN) are commonly used models for EEG-based emotion recognition due to their simplicity, interpretability, and computational efficiency [12].These models can handle high-dimensional EEG features without complex tuning, establishing a baseline of accuracy.However, they may struggle to capture complex nonlinear patterns in the EEG data.On the other hand, Support Vector Machines (SVM) can handle high-dimensional EEG features and can also capture nonlinear relationships between EEG features and emotional states using kernel functions.SVM is a widely used benchmark model in the literature for emotion recognition tasks [7].Deep Neural Networks (DNN) can automatically learn hierarchical representations from raw EEG signals, enabling the capture of complex nonlinear patterns.DNN can leverage large-scale EEG datasets to achieve state-of-the-art performance in emotion recognition.However, DNN requires extensive computational resources, which can be a limitation for practical applications [18].Graph Convolutional Neural Networks (DGCNN) can incorporate the spatial relationships between EEG electrodes by modeling the EEG data as a graph and also learning dynamic representations of EEG signals, capturing the temporal evolution of brain activity patterns.Compared to DNN, DGCNN has significantly reduced training time, making it more practical for applications [16].In summary, while LR and KNN provide a simple and efficient baseline, more advanced models like SVM, DNN, and DGCNN can capture complex nonlinear patterns in EEG data and achieve higher accuracy in emotion recognition tasks, with DGCNN offering a balance between performance and computational efficiency.
A meticulous selection process was employed regarding the parameters used for each of the models.For the K-Nearest Neighbors (KNN) classifier, the Euclidean distance is chosen as the distance metric, and the number of nearest neighbours was adjusted in the range of [3,10] to find the best hyperparameter.For Logistic Regression (LR), the parameters are calculated using maximum likelihood estimation, a standard function provided by the scikit-learn module.For the Support Vector Machine (SVM) classifier, the function in the scikit-learn module with a linear kernel is adopted, and the parameter C is defined through grid searches in the sets [2 (−10) , 2 (−9) , ..., 2 10 ] and [0.1, 20], with a step of 0.5 for large and small step situations, respectively.
For the DNN model used in this work, there are three hidden layers with 128, 64, and 32 hidden units, showcasing the adaptability of the model.The output layer has three units corresponding to three emotions.The non-linear activation function used is ReLU.The optimization algorithm used was RMSProp, and the number of epochs was set to 5000, demonstrating the model's ability to handle large datasets.For the DGCNN model, the input layer corresponds to the EEG features extracted from multiple frequency bands, highlighting its versatility in handling diverse data.All other hyperparams used in each model are described in the Table 3.After the graph filtering operation, there is a 1 × 1 convolutional layer, which aims to learn discriminative features among the various frequency domains.Additionally, to achieve the network's non-linear mapping capability, the ReLU activation function is adopted to ensure that the outputs of the graph filtering layer are non-negative.Finally, the outputs of the activation function are fed into a multi-layer fully connected network, and a softmax function is also used to predict the desired class label information from the input EEG features.
The research was conducted on hardware running Ubuntu 20, with an Intel Core i3 4005U processor, 8 GB DDR3 RAM, and no GPUs.The software environment utilized Python 3.7.16,scikit-learn 1.0.2, and PyTorch 1.13.1.
Figure 1 demonstrates a summary of the methodology used in this work.

Results Analysis
According to [6,12,13,37], there are two main types of experiments to evaluate the performance of emotion recognition in EEG signals.The first type of experiment is "subjectdependent", while the second is "subject-independent".
In the subject-dependent approach, data from a particular subject are divided into training and testing sets.In other words, data collected from a specific subject are used to train and test the model.This allows for the evaluation of the model's ability to recognize emotions from the subject's EEG data.In the case of the SEED dataset, the first nine trials of EEG data are used as the training set, and the remaining six as the testing set, as shown in Figure 2.Then, the recognition accuracy corresponding to each period is obtained for each subject.Finally, the mean classification accuracy and standard deviation of all 15 subjects over two sessions are calculated.However, this approach may lead to biased results as the model may memorize specific patterns of a subject, impairing its generalization to other subjects.
On the other hand, in the subject-independent approach, data from one set of subjects are used to train the model, and data from a different set of subjects are used to test it.In this case, the model's ability to generalize to subjects not seen during training is evaluated.This provides a more realistic assessment of the model's performance in real-world scenarios, where it needs to recognize emotions from unknown subjects.However, this approach can be more challenging as it requires the model to capture general patterns of emotion instead of relying on specific characteristics of each subject.In summary, the subject-dependent approach evaluates the model's performance in recognizing emotions from a specific subject.In contrast, the subject-independent approach assesses its performance in generalizing to subjects unseen during training.Both approaches have advantages and challenges, and the choice between them depends on the study's objectives and the nature of the EEG data.The subject-dependent approach was used in this study.

Results and Discussion
In this section, the results achieved through the application of machine learning models, namely Logistic Regression (LR), K-Nearest Neighbors (KNN), Support Vector Machines (SVM), Deep Neural Networks (DNN), and Graph Convolutional Neural Networks (DGCNN), are presented.Emotion (positive, negative, and neutral) was detected from SEED signals.Each model was evaluated considering accuracy metrics and standard deviation, providing a comprehensive view of its performance.

Traditional Machine Learning Models
The results presented in Table 4 demonstrate the accuracy and standard deviation for the Logistic Regression model applied to each of the five frequency bands of the EEG signal, as well as considering the entire frequency spectrum of the EEG signal.The model's detailed results for each individual and session are shown in Tables 5-10.The same results structure was generated for the KNN and SVM models.A comparison of the performance of traditional models across different features extracted from EEG signals for emotion detection is presented in Table 11.Six features were analyzed as follows: PSD.DE, DASM, RASM, ASM, and DCAU, with respect to the total frequency bands.For classification, traditional machine learning models LR, KNN, and SVM were used.
The results presented in Figures 3-7 show that the DE (differential entropy) features exhibited higher accuracy and lower standard deviation when compared to the traditional PSD (power spectral density) features.For all three models-Logistic Regression (LR), K-Nearest Neighbors (KNN), and Support Vector Machines (SVM)-the DE features produced the highest accuracies, with respective values of 82.46%, 75.23%, and 84.44%.This result suggests that DE features are more suitable for emotion recognition based on EEG than other features.Another important conclusion is that the asymmetry features (DASM, RASM, ASM) performed similarly and, in some cases, better than PSD, despite having fewer dimensions (135 (27 pairs of electrodes × 5 bands), 135 (27 pairs of electrodes × 5 bands), 270 (54 pairs of electrodes × 5 bands), and 310 (62 electrodes × 5 bands), respectively).These results suggest that the brain processing related to positive, neutral, and negative emotions exhibits asymmetrical characteristics.These results suggest that features such as DE and asymmetry features may be more relevant for emotion detection in EEG signals than traditional features like PSD.Additionally, the use of smoothing algorithms and the choice of the proper classifier can significantly impact the accuracy of emotion recognition.

Deep Learning Networks
The results in Table 12 indicate that the DNN classifier outperformed the SVM classifier, achieving an emotion recognition accuracy of 85.22%.Among the four evaluated classifiers, DNN proved to be the most effective for emotion recognition based on EEG.However, the processing time was a challenge due to the need to evaluate the best hyperparameters for the model.For each individual/session, 20 learning rates were evaluated, with an average processing time of 45 min for each rate, totaling 15 individuals × 3 sessions × 20 learning rates × 45 min, totaling approximately 28 h of processing.A significant advantage of the DGCNN model lies in its significantly reduced processing time when compared to the DNN model.While the DNN model requires an extensive training period, the DGCNN model achieves superior results and better accuracy in a considerably shorter time, ranging from 3 to 5 h.This efficiency in processing time enhances the practicality and feasibility of the model.
Regarding performance in each frequency band, β and γ indicate decreased activities for positive, neutral, and negative emotions.This result suggests that the spectral characteristics associated with these frequency bands are correlated with emotional expression and vary according to emotional state.This observation is consistent with the literature [12], which suggests that different emotional states may be reflected in distinct patterns of brain activity in different frequency bands.
For the DGCNN model, the experimental results presented in Table 12 demonstrate that the proposed method achieves better recognition performance than previous methods.The average recognition accuracy reached 89.97% for the subject-dependent experiment due to the following key points:

•
The use of a non-linear neural network like DGCNN makes it more effective in learning non-linear discriminative features.

•
The graph representation of DGCNN provides a useful way to characterize the intrinsic relationships between various EEG channels, which is advantageous for extracting the most discriminative features for the emotion recognition task.

•
The DGCNN model adaptively learns the intrinsic relationships of EEG channels by optimizing the adjacency matrix W. It is essential to highlight that the diagonal elements of the adjacency matrix indicate the contributions of EEG channels to emotion recognition.Therefore, the adjacency matrix can provide a way to identify which EEG channels have a more significant contribution to emotion recognition, which is advantageous for further improving emotion recognition performance.
Although the proposed DGCNN method has proven effective in emotion recognition from EEG, it is essential to note that the EEG databases used in the experiments are still relatively small in data volume.This may limit the use of more powerful deep neural network models and thus may restrict further improvements in the performance of this method.Therefore, it is desirable to have larger-scale EEG databases to address this challenge, which also becomes an important task for future research.
The performance of the five models is summarized in Table 13.Notably, the DGCNN model outperformed the others across all analyzed frequencies, underscoring its superiority.This result is particularly significant as it demonstrates the effectiveness of the graph-based model in five out of six analyzed attributes.However, it is worth noting that the DNN model showed higher accuracy only in the Power Spectral Density (PSD).This attribute, which captures the energy distribution across various frequencies in the EEG signal, poses a unique challenge due to its frequency distribution.Our analysis suggests that the inclusion of electrode topology mapping, achieved through the adjacency matrix in graphs, may not necessarily improve accuracy for this specific attribute.
As previously observed in this study through band analysis for traditional Machine Learning models, the β and γ bands are particularly relevant in identifying emotional states.Analyzing the β band, the DGCNN model's superiority again stands out, as demonstrated in Figure 5.The DGCNN's ability to handle the complexity of EEG patterns in this specific range results in a more precise interpretation of emotional responses.This consistent performance pattern highlights the model's robustness in various emotional contexts.The Figure related to the γ band also confirms the consistency of the DGCNN model in presenting superior performance.Its ability to capture detailed information and nuances in EEG patterns in this frequency range underscores the crucial role of DGCNN in analyzing emotions in more complex neurophysiological contexts.
In the evaluation of the δ, θ, and α bands, presented in Figures 3, 4 and 8, respectively, it is evident that the DGCNN model also consistently exhibits superior accuracy, indicating its effectiveness in identifying patterns in these specific frequency ranges.However, it is crucial to note that, despite the lower accuracy compared to other bands, this decrease does not necessarily reflect a limitation of the model but rather an intrinsic characteristic of the bands themselves.The lower accuracy in these ranges suggests that δ, θ, and α may be less expressive for detecting positive, negative, and neutral emotions than other frequency bands.This underscores the importance of a contextualized interpretation of performance metrics, recognizing that different bands may play varied roles in encoding complex emotional responses.This individual analysis of the different frequency bands reinforces the reliability and overall effectiveness of the DGCNN model across all bands, consolidating its position as a robust choice for emotion classification in EEG signals.Finally, a comparison with the literature is presented in Table 14, where the SVM and DNN models from the work of Zheng et al. [12] and DGCNN from Song et al. [38] are highlighted.These models are particularly noteworthy as they use the same dataset as this paper and, at the time of their publication, represented significant milestones in emotion classification from EEG signals.Notably, when comparing the performance of the SVM model across all features, the proposed model in this work exhibited higher accuracy.The improved performance is attributed to the grid search optimization conducted for each individual participant, which likely enabled the model to better capture the subjectspecific patterns in the EEG data.While the literature does not specify exactly how the parameter tuning was conducted, this work verified margin adjustment through the C parameter for each individual.Another notable distinction between this work and the studies previously cited in the literature is the inclusion of the asymmetry feature (ASM) in conjunction with DASM and RASM.While previous works focused exclusively on DASM (differential asymmetry) and RASM (rational asymmetry) measures, the present research seeks a more comprehensive understanding of asymmetry characteristics in the EEG context.
Incorporating ASM adds another dimension to the evaluation, allowing for a more refined analysis of asymmetrical characteristics in brain activity patterns.The inclusion of ASM, in conjunction with the optimization of the SVM model for each individual, highlights the innovative aspects of this work when compared to the existing literature.The DNN model developed in this work stands out by significantly surpassing the DNN model proposed by [12] in many features, as demonstrated in Table 15.Only in the case of differential entropy was the proposed model not superior.This advancement can be attributed to specific improvements implemented in the architecture of the DNN, especially the learning rate for each individual of the model obtained through hyperparameter tuning, highlighting the importance of refining and adapting existing models to achieve more robust and accurate results.The surpassing of the performance of the previous DNN model underscores the significant contribution of this study to the advancement in the field of emotion analysis in EEG signals, promoting a deeper understanding of the capabilities and limitations of these architectures in specific contexts.
The variation in the performance metrics of the DGCNN model across different features, such as DE and PSD with lower accuracy and DASM, RASM, and DCAU with higher accuracy, when compared to the accuracy reported in the work of Song et al. [38], can be attributed to the inherent complexities of specific EEG signal characteristics.These features' dynamic and nonlinear nature may influence the model's behavior.For DE and PSD, which capture information about energy distribution and entropy, respectively, the DGCNN's ability to effectively model these nuances may be related to the complexity of these representations.This is consistent with the findings of Zhang et al. [10], who observed that DE and PSD features are more challenging for deep learning models to capture when compared to asymmetry-based features.On the other hand, in features such as DASM, RASM, and DCAU, which reflect aspects of asymmetry and causality in the signal, the model proposed in this work was able to leverage its architecture better to identify discriminative patterns.It is important to note that despite variations in the results, the accuracy values remain close to those reported in the work of Song et al. [38], indicating consistency and validity.The convolutional layers, learning rate, and regularization parameters (weight decay) are the main factors that justify the differences between this work and the literature, and these discrepancies can be valuable for better understanding the nuances of EEG signals and providing insights into the capabilities and limitations of models in different emotional analysis contexts.The SEED dataset, while providing a valuable resource for emotion recognition research, has two key limitations.First, the SEED dataset may not fully represent the broader population or the diverse range of emotional experiences.Its relatively small size could limit the generalizability of the models trained on it as they may not capture the full complexity and variability of human emotions.This limited representativeness could constrain the models ability to accurately classify emotions across different demographics and contexts.Second, the generalization of the results may be affected by the specific nature of the SEED dataset, which consists of Chinese audiovisual stimuli.This cultural bias could limit the applicability of the emotion classification models to diverse populations and cultural contexts [6].Additionally, the choice of audiovisual stimuli in the SEED dataset may not capture the full range of emotional experiences, introducing a stimulus bias that could affect the models' performance and robustness.Furthermore, the use of a subject-dependent approach in emotion classification research with the SEED dataset, combined with its inherent limitations, introduces several potential biases that could undermine the generalizability and robustness of the models.The subject-dependent approach may lead to biased results as the model might memorize specific patterns of a subject, impairing its generalization to other subjects.This overfitting bias could result in the model performing well on the training subjects but failing to generalize to new, unseen subjects.
These potential biases, stemming from both the subject-dependent approach and the limitations of the SEED dataset, could undermine the reliability, generalizability, and realworld applicability of emotion classification research.

Conclusions
This work evaluates the effectiveness of different machine learning models, ranging from more conventional techniques to advanced deep learning approaches, in classifying emotions using EEG signals.The study seeks to identify the best-performing models and contribute to the evolution of the field, with the potential to positively impact society and technology.The novelty of this research lies in its comprehensive and comparative analysis of a wide range of machine learning and deep learning approaches, including the innovative use of Graph Convolutional Neural Networks (GCNNs), to advance emotion detection from EEG signals and address the gaps in the existing literature.It provides essential insights for emotional neuroscience, significantly expanding our understanding of the connections between brain activity and specific emotional states.
The results obtained in this study are consistent with referenced works and indicate the feasibility and potential applicability of Deep Neural Networks for emotion analysis in EEG signals.The analysis of different EEG signal features highlighted the significance of appropriate feature selection for optimal model performance.Additionally, the frequency band analysis provided a deeper understanding of EEG signal characteristics.The potential to enhance mental health systems, enabling more accurate diagnoses and personalized treatments, is noteworthy, Additionally, the possibility of using these models in braincomputer interfaces can improve human-machine interactions, making it more intuitive and efficient.
Furthermore, the results achieved through the GCNN architecture highlighted its effectiveness and superiority over other machine learning approaches in emotion detection from EEG.The differential entropy and differential causality attributes were the attributes that performed best in all frequency bands for the mentioned model, achieving accuracies of 89.97% and 89.36%, respectively.The DNN model, on the other hand, presented an accuracy of 85.22% and 84.71% for these features.Another significant result of the mentioned model concerns the PSD attribute, in which an accuracy of 80.56% was achieved, surpassing the GCNN model, with an accuracy of 79.39%.From evaluating these results, it is possible to conclude that deep learning models, especially graph-based models, are viable for emotion classification.The differential entropy and asymmetry attributes are the most suitable for correctly classifying positive, negative, and neutral emotions.
Regarding the individually analyzed frequency bands, it is notable that accuracy values are higher for the β and γ frequencies.In the γ frequency, the two highest accuracies were obtained through the GCNN model when analyzing the asymmetry attributes DASM and RASM, with values of 84.73% and 84.53%, confirming the relevance of the asymmetrical characteristics of EEG for emotion classification.In the β frequency, the best accuracy results were also obtained for the same model, but this time for the DE and ASM features, with values of 83.83% and 82.19%, confirming the importance of analyzing the nonlinearities of the EEG signal for emotion classification.Therefore, it is concluded that in addition to analyzing the entire frequency spectrum of the EEG signal, the analysis of specific frequency bands such as β and γ can assist in classifying emotions in EEG signals.
Given this work's discoveries and advances, several future research directions can be explored.Investigating different network architectures, including the combination of models (Ensemble), can provide insights into optimizing the performance of DGCNN or comparing it with other deep learning models.Furthermore, exploring advanced signal processing techniques, such as adaptive filtering, can enhance the quality of features extracted from EEG signals.Analyze the data with different methodology, such as, for example, subject-independent, to explore attention mechanisms and SWAP.Investigating the generalization of models to different populations and contexts is also a critical path to ensure applicability in diverse scenarios.

Figure 1 .
Figure 1.Methodology for acquisition, processing, and classification of electroencephalography data.

Figure 3 .
Figure 3. Results (accuracy/standard deviation) of all models described for frequency θ.

Figure 4 .
Figure 4. Results (accuracy/standard deviation) of all models described for frequency α.

Figure 5 .
Figure 5. Results (accuracy/standard deviation) of all models described for frequency β.

Figure 6 .
Figure 6.Results (accuracy/standard deviation) of all models described for frequency γ.

Figure 7 .
Figure 7. Results (accuracy/standard deviation) of all models described for all frequencies.

Figure 8 .
Figure 8. Results (accuracy/standard deviation) of all models described for frequency δ.

Table 2 .
SEED dataset features description.

Table 3 .
Hyperparameters for Machine/Deep Learning Models.

Table 4 .
Result (accuracy/standard deviation) of the LR model.

Table 5 .
Detailed accuracy by individual/session in the LR model-feature DE.

Table 6 .
Detailed accuracy by individual/session in the LR model-feature PSD.

Table 7 .
Detailed accuracy by individual/session in the LR model-feature DASM.

Table 8 .
Detailed accuracy by individual/session in the LR model-feature RASM.

Table 9 .
Detailed accuracy by individual/session in the LR model-feature ASM.

Table 10 .
Detailed accuracy by individual/session in the LR model-feature DCAU.

Table 11 .
Results (accuracy/standard deviation) of the LR, KNN, and SVM models.

Table 12 .
Results (accuracy/standard deviation) of the DNN and DGCNN models.

Table 13 .
Results (accuracy/standard deviation) of all models described by feature.

Table 14 .
Comparison of results with the literature.

Table 15 .
Comparison of the DNN Model with the literature.